package com.jqp.admin.common.face.config;

import com.baidu.aip.face.AipFace;
import com.jqp.admin.common.face.propreties.BaiduFaceProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author TangCheng
 * @date 2022/6/16 11:24
 * @description
 */
@Configuration
public class BaiduFaceConfig {

    @Autowired
    private BaiduFaceProperties baiduFaceProperties;


    @Bean
    public AipFace aipFace() {
        return new AipFace(baiduFaceProperties.getAppId(),
                baiduFaceProperties.getApiKey(),
                baiduFaceProperties.getSecretKey());
    }
}
